#include "reg52.h"
#include "delay.h"
unsigned char snum[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f, 0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71,0x00};
void shumaled(unsigned int num,unsigned int n){
	switch (num){
		case 1:P2=0xe3;break;
		case 2:P2=0xe7;break;
		case 3:P2=0xeb;break;
		case 4:P2=0xef;break;
		case 5:P2=0xf3;break;
		case 6:P2=0xf7;break;
		case 7:P2=0xfb;break;
		case 8:P2=0xff;break;
	}
	P0=snum[n];
}